<?php
		mysql_data_seek($forms_info, 0);
		/*echo "<pre>";
			print_r($forms_info);
		echo "</pre>";*/
		//$pup_only = $forms_info ;
		/*while($crap = sqlFetchArray($pup_only)){
			echo "<pre>";
			print_r($crap);
		echo "</pre>";
		}*/
		
		$dilated1 = '';
		$dilated2 = '';
		
		function create_dilated($value){
			global $dilated1, $dilated2, $forms_info;
			
			$dilated1 = "<td><select type='text' id='1_dilated_1' name='1_dilated_1'>".
						"	<option value='1' text='". xl('Normal')."'>".
								xl('Normal') .
						"	</option>".
						"	<option value='2' text='". xl('Abnormal')."'>".
								xl('Abnormal') .
						"	</option>".
						"</select></td>	";
			$dilated2 = "<td><select type='text' id='1_dilated_2' name='1_dilated_2'>".
						"<option value='1' text='". xl('Yes')."'>".
							xl('Yes') .
						"</option>".
						"<option value='2' text='". xl('No')."'>".
							xl('No') .
						"</option>".
						"</select></td>";
			
			$number = 2;
				while($row = sqlFetchArray($forms_info)){
					$dilated1 .= "<td><select type='text' id='".$number."_dilated_1' name='".$number."_dilated_1'  >".
						"	<option value='1' text='". xl('Normal')."'  ". selected(1, $row['dilated_fundus_examination']) .">".
								xl('Normal') .
						"	</option>".
						"	<option value='2' text='". xl('Abnormal')."' ". selected(2, $row['dilated_fundus_examination']) ." >".
								xl('Abnormal') .
						"	</option>".
						"</select></td>	";
					$dilated2 .= "<td><select type='text' id='".$number."_dilated_2' name='".$number."_dilated_2'>".
						"<option value='1' text='". xl('Yes')."' ". selected(1, $row['infrared_digital_photo']) ." >".
							xl('Yes') .
						"</option>".
						"<option value='2' text='". xl('No')."' ". selected(1, $row['infrared_digital_photo']) ." >".
							xl('No') .
						"</option>".
						"</select></td>";
					$number += 1;
				}
		
		
		}
		
		create_dilated(0);

?>		
        <table class="vertical_table" id='t_dilated_fundus_examination'>
            <caption><?php echo xl('Dilated Fundus Examination');?></caption>
            <thead>
                <tr>
                    <th colspan="3">1. <?php echo xl('Dilated Fundus Examination'); ?>:</th>
                </tr>
				<tr>
                    <th colspan="3">2. <?php echo xl('Infrared Digital Photography Perfomed?'); ?></th>
                </tr>
            </thead>
            <tbody>
				<tr>
					<?php echo $dilated1;?>		
				</tr>
				<tr>
					<?php echo $dilated2;?>	
				</tr>
				
            </tbody>
        </table>